$(function(){
	var $picL = $("#details div.magnify div.pic-l img");
	var $fdj = $("#details div.magnify div.fdj");
	var $mark = $("#details div.magnify div.pic-s div.mark");
	$("#details div.pic.left").hover(function(){
		$fdj.css("display","block");
		$picL.parent().css("display","block");
	},function(){
		$fdj.css("display","none");
		$picL.parent().css("display","none");
	})

	$("#details").on("mousemove",".mark",function(evt){
		var e = evt || window.event;
		var L = e.offsetX;
		var T = e.offsetY;
		var oL = L - 120;
		var oT = T - 120;
		if(L < 120){
			oL = 0
		}else if(L > 360){
			oL = 240;
		}
		if(T < 120){
			oT = 0
		}else if(T > 360 ){
			oT = 240;
		}
		$fdj.css({"left":oL,"top":oT});
		$picL.css({"margin-left":(-oL/480)*960,"margin-top":(-oT/480)*900})
	})
	var $li = $("#details .pic-list li");
	$li.mouseover(function(){
		var str = $(this).find("img").attr("src");		
		$(this).addClass("cur").siblings().removeClass("cur");
		$("#details div.pic-l img").attr("src",str)
		$("#details div.pic.left img").attr("src",str);
	})		
})
